<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>模型列表 - Powered By 暂停的故事（www.betou.net）</title>
<meta name="Author" content="暂停的故事 叶装装" />
<meta name="Copyright" content="暂停的故事" />
<#include "/betou_sys/head.html"/>
<script type="text/javascript">
function getTableForm() {
	return document.getElementById('tableForm');
}
function optDelete() {
	if(Pn.checkedCount('ids')<=0) {
		$.dialog({type: "warn", content:"<@s.m 'error.checkRecord'/>", modal: true, autoCloseTime: 3000});
		return;
	}
	$.dialog({type: "warn", content: "<@s.m 'global.confirm.delete'/>", ok: "确 定", cancel: "取 消", modal: true, okCallback: batchDelete});
}
function batchDelete(){
	var f = getTableForm();
	f.action="o_delete.do";
	$('.formButton').hide();
	f.submit();
}
function optPriority() {
	var f = getTableForm();
	f.action="o_priority.do";
	f.submit();
}
</script>
<style type="text/css">
.disabled{background-color:#ccc}
</style>
</head>
<body class="list">
<div class="box-positon">
	<@s.m "global.position"/>: <@s.m "cmsModel.function"/> - <@s.m "global.list"/>
	<div class="clear"></div>
</div>
<div class="body-box">
<form id="tableForm" method="post">
		<div class="listBar">
			<input class="formButton" type="submit" value="<@s.m "global.add"/>" onclick="this.form.action='v_add.do';"/>
		</div>
			
<@p.table value=list;cmsModel,i,has_next><#rt/>
	<@p.column title="<input type='checkbox' onclick='Pn.checkbox(\"ids\",this.checked)'/>" width="20">
		<input type='checkbox' name='ids' value='${cmsModel.id}'/><#t/>
	</@p.column><#t/>
	<@p.column title="ID">${cmsModel.id}</@p.column><#t/>
	<@p.column code="cmsModel.name">${cmsModel.name}(${cmsModel.path})</@p.column><#t/>
	<@p.column code="cmsModel.tplChannelPrefix">${cmsModel.tplChannelPrefix}</@p.column><#t/>
	<@p.column code="cmsModel.tplContentPrefix">${cmsModel.tplContentPrefix!}</@p.column><#t/>
	<@p.column code="cmsModel.priority" >
		<input type="text" name="priority" value="${cmsModel.priority}" style="width:40px"/>
		<input type="hidden" name="wids" value="${cmsModel.id}"/>
	</@p.column><#t/>
	<@p.column code="cmsModel.def" >
		<input type="radio" name="defId" value="${cmsModel.id}"<#if cmsModel.def> checked="checked"</#if>/>
	</@p.column><#t/>
	<@p.column code="cmsModel.disabled" >
		<input type="checkbox" onclick="$('#disabled${i}').val(!this.checked)"<#if !cmsModel.disabled> checked="checked"</#if>/>
		<input type="hidden" id="disabled${i}" name="disabled" value="${cmsModel.disabled?string('true','false')}"/>
	</@p.column><#t/>
	<@p.column code="global.operate" >
		<a href="v_edit.do?id=${cmsModel.id}" class="pn-opt"><@s.m "global.edit"/></a> | <#rt/>
		<a href="../item/v_list.do?modelId=${cmsModel.id}&isChannel=true" class="pn-opt"><@s.m "cmsModel.modelChannel"/></a> | <#rt/>
		<a<#if cmsModel.hasContent> href="../item/v_list.do?modelId=${cmsModel.id}&isChannel=false" class="pn-opt"<#else> disabled="disabled" class="disabled pn-opt"</#if>><@s.m "cmsModel.modelContent"/></a> | <#rt/>
		<a href="o_delete.do?ids=${cmsModel.id}" class="pn-opt" onclick="if(!confirm('<@s.m "global.confirm.delete"/>')) {return false;}"><@s.m "global.delete"/></a><#t/>
	</@p.column><#t/>
</@p.table>


<div class="pagerBar">
		<div class="delete">
			<input type="button" value='<@s.m "global.delete"/>' onclick="optDelete();" class="formButton" />
						&nbsp; <input type="button" value="<@s.m "global.saveOrder"/>" onclick="optPriority();" class="formButton"/>
		</div>
</div>
</form>
</div>
<#include "/common/alert_message.html"/>
</body>
</html>